import request from '@/utils/request'

export default {
    //获取医院列表
    getHospitalSetList(current, limit, searchObj) {
        return request({
            url: `/admin/hosp/hospitalSet/findByPage/${current}/${limit}`,
            method: 'post',
            data: searchObj //使用json格式传输数据
        })
    },
    //根据id删除数据
    deleteHospSetById(id) {
        return request({
            url: `/admin/hosp/hospitalSet/deleteById/${id}`,
            method: 'delete'
        })
    },
    //批量删除数据
    batchDeleteHospSet(idList) {
        return request({
            url: `/admin/hosp/hospitalSet/batchDelete`,
            method: 'delete',
            data: idList
        })
    },
    //锁定或取消锁定
    lockHospSet(id, status) {
        return request({
            url: `/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
            method: 'put'
        })
    },
    //添加医院设置信息
    saveHospSet(hospSet) {
        return request({
            url: `/admin/hosp/hospitalSet/saveHospitalSet`,
            method: 'post',
            data: hospSet
        })
    },
    //根据id查询数据
    getHospSetById(id) {
        return request({
            url: `/admin/hosp/hospitalSet/getById/${id}`,
            method: 'get'
        })
    },
    //修改医院设置
    updateHospSet(hospSet) {
        return request({
            url: `/admin/hosp/hospitalSet/updateHospitalSet`,
            method: 'post',
            data: hospSet
        })
    },
}